package route

import (
	"net/http"
	"nick-gingin/controller"

	"github.com/gin-gonic/gin"
)

func Init(r *gin.Engine) {
	r.GET("/", func(c *gin.Context) {
		c.String(http.StatusOK, "欢迎来到 nick nick")
	})
	apiGroup := r.Group("api")
	{
		userGroup := apiGroup.Group("/user")
		{
			userGroup.POST("/login", controller.UserController{}.Login)

			userGroup.GET("/register", controller.UserController{}.Register)
		}

	}

}
